package com.atxiao.demo.service;

import com.atxiao.demo.bean.Account;
import com.atxiao.demo.mapper.AccountMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class AccountServiceImpl implements AccountService{

    @Resource
    private AccountMapper accountMapper;

    public List<Account> getAccountsByUser(String idCard) {
        QueryWrapper<Account> wrapper = new QueryWrapper<>();
        wrapper.eq("id_card",idCard);
        return accountMapper.selectList(wrapper);
    }
}
